package com.houpu.controller;

import com.houpu.dao.DepartmentMapper;
import com.houpu.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author miao
 * @date 2019/11/5  16:23
 */
@RestController
@RequestMapping("/department")
public class DepartmentController {

    @Autowired
    private DepartmentService departmentService;

    @RequestMapping("/list.do")
    public List<Map<String, Object>> list() {
        List<Map<String, Object>> maps = departmentService.queryAll();
        System.out.println(maps);
        return maps;
    }
}
